package com.berchen.busidb.config;

import org.mybatis.spring.mapper.MapperScannerConfigurer;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@AutoConfigureAfter(BusidbMapperConfig.class)
public class BusidbMapperConfig {

    @Bean(name = "busidbMapperScannerConfig")
    public MapperScannerConfigurer mapperScannerConfigurer(){
        MapperScannerConfigurer configurer=new MapperScannerConfigurer();
        configurer.setBasePackage("com.berchen.busidb.dao");
        configurer.setSqlSessionFactoryBeanName("busiSqlSessionFactory");
        return configurer;
    }
}
